package com.yxinsur.imc.business.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.yxinsur.imc.business.domain.ImcContractExpenseRate;
import com.yxinsur.imc.business.form.ContractExpenseSearchForm;
import com.yxinsur.imc.business.vo.ContractExpenseRateVo;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * 协议-产品费率 Mapper接口
 *
 * @author imc
 * @date 2021-08-20
 */
@Mapper
public interface ImcContractExpenseRateMapper extends BaseMapper<ImcContractExpenseRate> {
    /**
     * 查询协议-产品费率
     *
     * @param id 协议-产品费率ID
     * @return 协议-产品费率
     */
    public ContractExpenseRateVo selectImcContractExpenseRateById(Long id);

    /**
     * 查询协议-产品费率列表
     *
     * @param contractExpenseSearchForm 协议-产品费率
     * @return 协议-产品费率集合
     */
    public List<ImcContractExpenseRate> selectImcContractExpenseRateList(ContractExpenseSearchForm contractExpenseSearchForm);

    /**
     * 新增协议产品费率
     *
     * @param imcContractExpenseRate 协议-产品费率
     * @return 结果
     */
    public int insertImcContractExpenseRate(ImcContractExpenseRate imcContractExpenseRate);

    /**
     * 修改协议-产品费率
     *
     * @param imcContractExpenseRate 协议-产品费率
     * @return 结果
     */
    public int updateImcContractExpenseRate(ImcContractExpenseRate imcContractExpenseRate);

    /**
     * 删除协议-产品费率
     *
     * @param id 协议-产品费率ID
     * @return 结果
     */
    public int deleteImcContractExpenseRateById(String id);

    /**
     * 批量删除协议-产品费率
     *
     * @param ids 需要删除的数据ID
     * @return 结果
     */
    public int deleteImcContractExpenseRateByIds(String[] ids);

    List<ContractExpenseRateVo> selectContractExpenseRateVoList(@Param("expenseForm") ContractExpenseSearchForm contractExpenseSearchForm, @Param("tenantId") Long tenantId);

    /**
     * 根据{协议费用科目ID}查询协议产品费率
     *
     * @param contractExpenseId 协议费用科目ID
     * @return 协议产品费率
     */
    List<ImcContractExpenseRate> listImcContractExpenseRateByContractExpenseId(@Param("contractExpenseId") Long contractExpenseId);
}
